package com.wzh.test.leetcode;

public class SingleNumber {
    public static void main(String[] args) {
        int[] arrNums = {5,5,6,6,7,8,8};
        int i = singleNum(arrNums);
        System.out.println(i);
    }

    public static int singleNum(int[] arrNums){
        int k = arrNums[0];
        for(int i = 1; i < arrNums.length;i++){
            k = k ^ arrNums[i];
        }
        return k;
    }
}
